package inner_class;

import java.util.Comparator;
import java.util.PriorityQueue;
import java.util.Queue;

public class incognitoClass {
    public static void main(String[] args) {
        Queue<Integer> queue=new PriorityQueue<>(new Comparator<Integer>() {
            @Override
            public int compare(Integer o1, Integer o2) {
                return 0;
            }
        });
        fun(
        //-------------------------------------
        //匿名内部类
                new Imessage() {
            @Override
            public void getmsg(String msg) {

            }
        }
        //---------------------------------------
        );
    }

    public static void fun(Imessage message){
        message.getmsg("测试匿名内部类");
    }
}

interface Imessage{
    void getmsg(String msg);
}
